//
//  DDDNativeAdsManager.h
//  DDDDemo
//
//  Created by mu on 2020/7/15.
//  Copyright © 2020 summer. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "DDDNativeExpressAdView.h"
#import "DDDAdConfigManager.h"

NS_ASSUME_NONNULL_BEGIN


@class DDDNativeExpressAdView;
@protocol DDDNativeAdsManagerDelegate <NSObject>
@optional

/// 获取到视图的回调
/// @param views 获取到的视图数据
- (void)nativeExpressAdSuccessToLoadViews:(NSArray<__kindof DDDNativeExpressAdView *> *)views;

/// 视图加载失败的回调
/// @param errorCode 错误码
- (void)nativeExpressAdFailToLoadError:(NSInteger)errorCode;

/// 视图无法描述时的回调
/// @param errorCode 错误码
- (void)nativeExpressAdViewRenderFailRrror:(NSInteger)errorCode;

/// 视图即将呈现时的回调
- (void)nativeExpressAdViewWillShow ;

/// 视图被点击时的回调
- (void)nativeExpressAdViewDidClick;

/// 用户点击不喜欢
/// @param filterwords 原因数组
- (void)nativeExpressAdViewDislikeWithReason:(NSArray<NSString *> *_Nullable)filterwords;

/// 当点击关闭另一个控制器时的回调
- (void)nativeExpressAdViewDidCloseOtherController;

/// 模板渲染成功，可以动态获取视图的高度
- (void)nativeExpressAdViewRenderSuccess;

@end
@interface DDDNativeAdsManager : NSObject

@property (nonatomic, weak, nullable) id<DDDNativeAdsManagerDelegate> delegate;


/// 初始化页面数据
/// @param adSize 视图尺寸
/// @param adType 视图类型
- (instancetype)initWithAdSize:(CGSize)adSize andAdType:(DDDNativeAdsManagerType)adType;


/// 获取视图
/// @param count 获取视图个数（最大一次为3个）
- (void)loadData:(NSInteger)count;

@end

NS_ASSUME_NONNULL_END
